package com.lc.zpyh.ui.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.lc.zpyh.R;
import com.lc.zpyh.app.AppActivity;
import com.lc.zpyh.ui.activity.mine.XieYiActivity;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

public class AgreementActivity extends AppActivity {
    @BindView(R.id.app_name_tv)
    TextView appNameTv;

    @Override
    protected int getLayoutId() {
        return R.layout.dialog_agreement_layout;
    }

    @Override
    protected void initView() {

    }

    @Override
    protected void initData() {

    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        // TODO: add setContentView(...) invocation
        ButterKnife.bind(this);


    }



    @OnClick({R.id.agreement_cancel, R.id.agreement_agreement,R.id.agreement_tv1,R.id.agreement_tv2})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.agreement_tv1:
                startActivity(new Intent(this, XieYiActivity.class).putExtra("title","用户协议"));

                break;
            case R.id.agreement_tv2:
                startActivity(new Intent(this,XieYiActivity.class).putExtra("title","隐私条款"));

                break;
            case R.id.agreement_cancel:
                finish();
                break;
            case R.id.agreement_agreement:
                Intent intent = new Intent(getContext(), MainActivity.class);
                getContext().startActivity(intent);
                finish();
                break;
        }
    }
}
